<template>
  <div>
    <div class="inspection_evaluation">
      <div class="panel_header">
        <i class="iconfont">&#xe66d;</i>
        供应商考察评估结果
      </div>
      <div class="inspection_evaluation_list">
        <el-form :model="form">
          <el-row>
            <el-col :span="4" class="col_label">供应商编码</el-col>
            <el-col :span="4" class="col_view">{{form.vendorCode}}</el-col>
            <el-col :span="4" class="col_label">ERP代码</el-col>
            <el-col :span="4" class="col_view">{{form.vendorErpCode}}</el-col>
            <el-col :span="4" class="col_label">供应商名称</el-col>
            <el-col :span="4" class="col_view">{{form.vendorName}}</el-col>
          </el-row>
        </el-form>
      </div>
      <div class="inspection_evaluation_list">
        <el-form :model="result">
          <el-row>
            <el-col :span="4" class="col_label">评分附件</el-col>
            <el-col :span="20" class="col_view">{{result.materialCode}}</el-col>
          </el-row>
          <el-row>
            <el-col :span="4" class="col_label"> 结论</el-col>
            <el-col :span="20" class="col_view">{{result.resultFlag == 1 ? '通过' : '未通过'}}</el-col>
          </el-row>
          <el-row>
            <el-col :span="4" class="col_label">是否需要整改</el-col>
            <el-col :span="20" class="col_view">{{result.materialName == 1 ? '是' : '否'}}</el-col>
          </el-row>
          <el-row>
            <el-col :span="4" class="col_label">评估意见</el-col>
            <el-col :span="20" class="col_view">{{result.checkOpinion}}</el-col>
          </el-row>
          <el-row>
            <el-col :span="4" class="col_label">整改要求描述</el-col>
            <el-col :span="20" class="col_view">{{result.improveRequirement}}</el-col>
          </el-row>
        </el-form>
      </div>      
    </div>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        form: {},
        result:{},
        tableData: []
      }
    },
    created(){
      this.init()
    },
    methods: {
      init(){
        //获取供应商评分结果
        this.axios.post(this.lib.config.host.vendorDlv + '/vendormgt/dlv/factoryInspect/score/toViewScoreItem/' + this.$route.query.id)
          .then((response) => {
            console.log(response)
            console.log(response.data.inspectItem)
            this.result= response.data;
            this.form= response.data.inspectItem;
          })
          .catch(function (error) {
            console.log(error);
          });        
      }
    }
  }

</script>
